//
//  ArtGalleryReusableView.m
//  jingdongfang
//
//  Created by MTiMac01 on 2017/8/21.
//  Copyright © 2017年 LJL. All rights reserved.
//

#import "ArtGalleryReusableView.h"

@implementation ArtGalleryReusableView
- (UIButton *)moreBtn
{
    if (!_moreBtn)
    {
        self.moreBtn = [[UIButton alloc] init];
        [self.moreBtn setImage:[UIImage imageNamed:@"home_up"] forState:UIControlStateNormal];
        [self.moreBtn setImage:[UIImage imageNamed:@"home_down"] forState:UIControlStateSelected];
        self.moreBtn.backgroundColor = [UIColor whiteColor];
        [self.moreBtn addTarget:self action:@selector(clickShowMoreBtn:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _moreBtn;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.backgroundColor = [UIColor c3Color];
    self.moreBtn.frame = CGRectMake(0, 0, KSCREENWIDTH, 20);
    [self addSubview:self.moreBtn];
}

- (void)clickShowMoreBtn:(UIButton *)btn
{
    self.moreBtn.selected = !self.moreBtn.selected;
    self.block(btn);
}
@end
